// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_CONTRACT_HISTORY
// * CreateDate    : 2011/11/7 12:58:39
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/7 12:58:39
// * LastChanger   : 2011/11/7 12:58:39
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class HrContractHistoryEntity : EntityBase
    {
        public HrContractHistoryTable TableSchema
        {
            get
            {
                return HrContractHistoryTable.Current;
            }
		}
		
		public HrContractHistoryEntity()
        {

        }
		
		public HrContractHistoryEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ContractHistoryId = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_HISTORY_ID"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.ContractCode = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_CODE"]));
			this.ContractDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_DATE"]));
			this.ContractStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_START_DATE"]));
			this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
        }
		
		public HrContractHistoryEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ContractHistoryId = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_HISTORY_ID"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.ContractCode = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_CODE"]));
			this.ContractDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_DATE"]));
			this.ContractStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_START_DATE"]));
			this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrContractHistoryTable.Current;
            }
        }
		
		#region Perporty List
        public string ContractHistoryId
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_CONTRACT_HISTORY_ID)); }
            set { SetData(HrContractHistoryTable.C_CONTRACT_HISTORY_ID, value); }
        }
		
        public string PersonId
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_PERSON_ID)); }
            set { SetData(HrContractHistoryTable.C_PERSON_ID, value); }
        }

        public string ContractCode
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_CONTRACT_CODE)); }
            set { SetData(HrContractHistoryTable.C_CONTRACT_CODE, value); }
        }
		
        public DateTime ContractDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_CONTRACT_DATE)); }
            set { SetData(HrContractHistoryTable.C_CONTRACT_DATE, value); }
        }
		
        public DateTime ContractStartDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_CONTRACT_START_DATE)); }
            set { SetData(HrContractHistoryTable.C_CONTRACT_START_DATE, value); }
        }
		
        public DateTime ContractEndDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_CONTRACT_END_DATE)); }
            set { SetData(HrContractHistoryTable.C_CONTRACT_END_DATE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_REMARK)); }
            set { SetData(HrContractHistoryTable.C_REMARK, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_STATUS)); }
            set { SetData(HrContractHistoryTable.C_STATUS, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_CREATED_DATE)); }
            set { SetData(HrContractHistoryTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_CREATED_BY)); }
            set { SetData(HrContractHistoryTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(HrContractHistoryTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_LAST_MODIFIED_BY)); }
            set { SetData(HrContractHistoryTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(HrContractHistoryTable.C_APPROVED_DATE)); }
            set { SetData(HrContractHistoryTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(HrContractHistoryTable.C_APPROVED_BY)); }
            set { SetData(HrContractHistoryTable.C_APPROVED_BY, value); }
        }
		
		#endregion
	}
	
	
}	

